package demo;

/**
 * 定义人员对象
 * @author ZhouWeiBo
 * @create 2022/6/8
 */
public class Person {
    private String name;
    private Sex sex;
    private Integer age;
    private Integer requireAge;

    public enum Sex{
        /**
         * 男性
         */
        MAN,
        /**
         * 女性
         */
        WOMAN
    }

    public void askToPair(IMediator mediator){
        System.out.println("你好，我想找一个对象~");
        mediator.pair(this);
    }

    public Person(String name, Sex sex, Integer age, Integer requireAge) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.requireAge = requireAge;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Sex getSex() {
        return sex;
    }

    public void setSex(Sex sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Integer getRequireAge() {
        return requireAge;
    }

    public void setRequireAge(Integer requireAge) {
        this.requireAge = requireAge;
    }


}
